package com.kaba.bean.json;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @BelongsProject：st-project
 * @BelongsPackage：com.kaba.bean.json
 * @Author：pvz77
 * @CreateTime：2021-03-03 17:01
 * @Description： TODO
 *
 * Session.Cookie
 */
public class Cookie {

    private Long originalMaxAge;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date expires;
    private Boolean secure;
    private Boolean httpOnly;

    /**
     * 路径
     */
    private String path;

    @JsonProperty("originalMaxAge")
    public long getOriginalMaxAge() { return originalMaxAge; }
    @JsonProperty("originalMaxAge")
    public void setOriginalMaxAge(long value) { this.originalMaxAge = value; }

    @JsonProperty("expires")
    public Date getExpires() { return expires; }
    @JsonProperty("expires")
    public void setExpires(Date value) { this.expires = value; }

    @JsonProperty("secure")
    public Boolean getSecure() { return secure; }
    @JsonProperty("secure")
    public void setSecure(Boolean value) { this.secure = value; }

    @JsonProperty("httpOnly")
    public Boolean getHTTPOnly() { return httpOnly; }
    @JsonProperty("httpOnly")
    public void setHTTPOnly(Boolean value) { this.httpOnly = value; }

    @JsonProperty("path")
    public String getPath() { return path; }
    @JsonProperty("path")
    public void setPath(String value) { this.path = value; }
}
